<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        let arr = [1,2,3,4,5,6,7,5,4,3,2,1,3,4,4,3]
        // 方法一
        let newArr = new Set(arr)
        console.log(Array.from(newArr));
        // 方法二
        let newArr1 = [...new Set(arr)]
        console.log(newArr1);
    </script>
</head>
<body>
    
</body>
</html>